package com.lbt.framework.dao;

import java.io.Serializable;
import java.util.List;

import com.lbt.framework.general.Page;
import com.lbt.framework.general.Paging;
import com.lbt.framework.general.Searching;
import com.lbt.framework.general.Sorting;


public interface Dao<T> {

	public int countByExample(T example);

	public int countByExample(T example, String searchWord);
	
	public void delete(T entity);
	
	public T get(Serializable id);
	
	public List<T> listByExample(T example);
	
	public List<T> listByExample(T example, Sorting sort);
	
	public List<T> listByExample(T example, Sorting sort, String searchWord);
	
	public Page<T> listByExample(T example, Paging page);
	
	public Page<T> listByExample(T example, Paging page, String searchWord);
	
	public Page<T> listByExample(T example, Searching search);

	public T merge(T entity);

	public T persist(T entity);

	public T save(T entity);

	public T saveOrUpdate(T entity);

	public T update(T entity);

}
